 <div class="modal-content">
		 <div class="modal-header">
		    <button type="button" class="close" 
		       data-dismiss="modal" aria-hidden="true">
		          &times;
		    </button>
		    <h4 class="modal-title" id="myModalLabel">
		    	添加文章
		    </h4>
		 </div>
		 <div class="modal-body">
			<form class="form-horizontal" id="articleForm" role="form">
	           <input type="hidden" name="id" value="${article.id}"/>
			   <div class="form-group">
			      <label class="col-sm-2 control-label">博客标题</label>
			      <div class="col-sm-10">
			         <input class="form-control" type="text" value="${article.title}" name="title" placeholder="请输入博客标题"/>
			      </div>
			   </div>
			   <div class="form-group">
			      <label for="inputPassword" class="col-sm-2 control-label">
			         	文章类型
			      </label>
			      <div class="col-sm-4">
	  		          <select id="disabledSelect" name="articleType" class="form-control">
			               <option value="1" <#if article.articleType ==1> selected</#if>>程序人生</option>
			               <option value="2" <#if article.articleType ==2> selected</#if>>思维天地</option>
			           </select>
			      </div>
  			      <label for="inputPassword" class="col-sm-2 control-label">
			         	状态
			      </label>
			      <div class="col-sm-4">
	  		          <select id="disabledSelect" name="visible" class="form-control">
			               <option value="1" <#if article.visible ==1> selected</#if>>可见</option>
			               <option value="0" <#if article.visible ==0> selected</#if>>不可见</option>
			           </select>
		           </div>
			   </div>
		      <div class="form-group">
		         <label for="disabledTextInput"  class="col-sm-2 control-label">
		        	    排序
		         </label>
		         <div class="col-sm-2">
		            <input type="text"  name="articleOrder" value="${article.articleOrder}" class="form-control" placeholder="请输入排序"/>
		         </div>
  		         <label for="disabledTextInput"  class="col-sm-2 control-label">
		        	    创建日期
		         </label>
 		         <label for="disabledTextInput"  class="col-sm-2 control-label" style="text-align:left">
 		         	${article.createDate}
 		         	<#if article.id==null>—</#if>
		            <#-- <input type="text" readonly value="${article.createDate}" name="createDate" class="form-control form_datetime" placeholder="请输入创建日期"/> -->
		         </label>
 		         <label for="disabledTextInput"  class="col-sm-2 control-label">
		        	    更新日期
		         </label>
 		         <label for="disabledTextInput"  class="col-sm-2 control-label" style="text-align:left">
 		       		 ${article.updateDate}
 		       		 <#if article.id==null>—</#if>
		         </label>
		          <#-- <script type="text/javascript">  $(".form_datetime").datetimepicker({format: 'yyyy-mm-dd',minView: 'month',autoclose:true});</script>-->

		      </div>
			  <div class="form-group">
		         <label for="disabledTextInput"  class="col-sm-2 control-label">
		        	    内容
		         </label>
	             <script type="text/javascript" charset="utf-8" src="${request.contextPath}/resources/js/umeditor/umeditor.config.js"></script>
				 <script type="text/javascript" charset="utf-8" src="${request.contextPath}/resources/js/umeditor/umeditor.js"></script>
				 <script type="text/javascript" src="${request.contextPath}/resources/js/umeditor/lang/zh-cn/zh-cn.js"></script>
 				 
				 
				 <div class="col-sm-10">
					<script type="text/plain" id="content" >${article.content}</script>
					<script>
						 window.UMEDITOR_CONFIG.textarea = 'content';
						 var um = UM.getEditor('content');
						 um.setWidth("95%");
						 $(".edui-body-container").css("width", "95%");
					</script>
				 </div>
			  </div>
			</form>
		 </div>
		 <div class="modal-footer">
		    <button type="button" class="btn btn-default" 
		       data-dismiss="modal">关闭
		    </button>
		    <button type="button" class="btn btn-primary" onclick="saveArticleFn();">
		      	 提交更改
		    </button>
		 </div>
  </div>
<script>
var saveArticleFn = function()
{
	$.ajax({
		url:'${request.contextPath}/article/addOrSaveArticle.htm',
		type:'post',
		dataType:'json',
		cache:false,
		processData:true,
		data:$('#articleForm').serialize(),
		success:function(data)
		{
			
			alert(data.msg);
			if(data.success==1)
			{
				$('#articleModal').modal('hide');
				searchData();
			}	
		}
	});
}
  </script>